package com.liuqi.tool.idea.plugin.codegenerator.bean;

import com.liuqi.tool.idea.plugin.codegenerator.utils.MyStringUtils;

/**
 * 实体类字段
 *
 * @author  LiuQi 2025/4/6-9:52
 * @version V1.0
 **/
public class EntityField {
    private Boolean isSystem = false;
    private String field = "";
    private String name;
    private String comment = "";
    private Boolean required = false;
    private String type = "varchar";
    private String config = "";
    private String defaultValue = "";
    private Boolean queryEnabled = false;
    private String queryType = "eq";
    private Boolean unique = false;
    private String width;
    private String editor;
    private String editorConfig;

    public String getFieldUnderline() {
        return MyStringUtils.toUnderLineStr(field);
    }

    public Boolean getSystem() {
        return isSystem;
    }

    public EntityField setSystem(Boolean system) {
        isSystem = system;
        return this;
    }

    public String getType() {
        return type;
    }

    public EntityField setType(String type) {
        this.type = type;
        return this;
    }

    public String getField() {
        return field;
    }

    public EntityField setField(String field) {
        this.field = field;
        return this;
    }

    public String getComment() {
        return comment;
    }

    public EntityField setComment(String comment) {
        this.comment = comment;
        return this;
    }

    public Boolean getRequired() {
        return required;
    }

    public EntityField setRequired(Boolean required) {
        this.required = required;
        return this;
    }

    public String getConfig() {
        return config;
    }

    public EntityField setConfig(String config) {
        this.config = config;
        return this;
    }

    public String getDefaultValue() {
        return defaultValue;
    }

    public EntityField setDefaultValue(String defaultValue) {
        this.defaultValue = defaultValue;
        return this;
    }

    public Boolean getQueryEnabled() {
        return queryEnabled;
    }

    public EntityField setQueryEnabled(Boolean queryEnabled) {
        this.queryEnabled = queryEnabled;
        return this;
    }

    public String getQueryType() {
        return queryType;
    }

    public EntityField setQueryType(String queryType) {
        this.queryType = queryType;
        return this;
    }

    public Boolean getUnique() {
        return unique;
    }

    public EntityField setUnique(Boolean unique) {
        this.unique = unique;
        return this;
    }

    public String getName() {
        return name;
    }

    public EntityField setName(String name) {
        this.name = name;
        return this;
    }

    public String getWidth() {
        return width;
    }

    public EntityField setWidth(String width) {
        this.width = width;
        return this;
    }

    public String getEditorConfig() {
        return editorConfig;
    }

    public EntityField setEditorConfig(String editorConfig) {
        this.editorConfig = editorConfig;
        return this;
    }

    public String getEditor() {
        return editor;
    }

    public EntityField setEditor(String editor) {
        this.editor = editor;
        return this;
    }
}
